const path = require("path");

module.exports = {
  mode: "development",
  entry: "./app/index.jsx",
  output: {
    path: path.resolve(__dirname, "public/assets"),
    filename: "bundle.js"
  },
  module: {
    rules: [{
      exclude: /node_modules/,
      test: /\.jsx?$/,
      use: "babel-loader"
    }, {
      test: /\.css$/,
      use: ['style-loader', 'css-loader']
    }]
  },
  resolve: {
    extensions: [".js", ".jsx", ".json"],
    alias: {
      "@": path.resolve(__dirname, "app"),
      "@components": "@/components",
      "@pages": "@/pages",
      "@redux": "@/redux",
      "@styles": "@/styles",
      "@utils": "@/utils",
    }
  },
  devtool: "cheap-module-source-map",
  stats: {
    modules: false,
    timings: false,
    version: false,
    entrypoints: false,
    builtAt: false,
    hash: false
  }
};
